import type { RouteConfig } from '../../typings/router';
import dictController from '../controllers/dict';

/**
 * 数据字典类型模块路由
 */
const dictRoutes: RouteConfig[] = [
    {
        method: 'get',
        name: 'dictInfo',
        path: '/dict/info',
        middlewares: [dictController.infoAction],
    },
    {
        method: 'get',
        name: 'dictRetrieve',
        path: '/dict/retrieve',
        middlewares: [dictController.retrieveAction],
    },
    {
        method: 'post',
        name: 'dictAdd',
        path: '/dict/add',
        middlewares: [dictController.addAction],
    },
    {
        method: 'delete',
        name: 'dictDelete',
        path: '/dict/delete',
        middlewares: [dictController.deleteAction],
    },
    {
        method: 'put',
        name: 'dictUpdate',
        path: '/dict/update',
        middlewares: [dictController.updateAction],
    },
    {
        method: 'get',
        name: 'dictList',
        path: '/dict/list',
        middlewares: [dictController.listAction],
    },
    {
        method: 'get',
        name: 'dictCheckDictType',
        path: '/dict/checkDictType',
        middlewares: [dictController.checkDictTypeAction],
    },
];

export default dictRoutes;
